

# Leia controle já calculado, aplique-o ao sistema original.

import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import csv
import sys
import math


if len(sys.argv) < 2:
    print ("Please:\npython3 Plot.py arquivo.csv\n")
    sys.exit (-1)
try:
    dados = pd.read_csv(sys.argv[1])
except:
    print ("File not found [" + sys.argv[1] + "]")
    sys.exit (0);



#sns.set_style("whitegrid")

# make a plot
plt.figure(1)

plt.plot(dados.Day, dados.Infected, color="green", linestyle = 'dashed', label='Simulation')

plt.xlabel("Day",fontsize=14)
plt.ylabel("Infected",fontsize=14)

plt.plot(dados.Day, dados.Reference,color="blue", label='Target')

plt.title ('Daily Infections', fontsize=18)
plt.legend()
plt.grid()

ax = plt.gca()
for item in ([ax.title,ax.xaxis.label, ax.yaxis.label] + \
             ax.get_xticklabels() + ax.get_yticklabels()):
    item.set_fontsize(14)

for item in ax.get_legend().get_texts():
    item.set_fontsize(14)

plt.draw()
plt.show()

#quit()

fig=plt.plot(dados.Day, dados.Reference_Total, color="blue", label='Target')

plt.subplots_adjust(
top=0.88,
bottom=0.12,
left=0.19,
right=0.9,
hspace=0.2,
wspace=0.2
)


plt.plot(dados.Day, dados.Total,color="green", linestyle = 'dashed', label='Simulation')
plt.title ('Total Infections', fontsize=18)
plt.grid()
plt.xlabel("Day",fontsize=14)
plt.ylabel("Total people infected",fontsize=14)
plt.legend()

ax = plt.gca()
for item in (\
             #[ax.title,ax.xaxis.label, ax.yaxis.label] + \
             ax.get_xticklabels() + ax.get_yticklabels()):
    item.set_fontsize(14)

for item in ax.get_legend().get_texts():
    item.set_fontsize(14)


plt.draw()

plt.savefig('Figure-8b.eps', format='eps')
plt.savefig('Figure-8b.png', dpi=400)

plt.show()

quit()


